package com.zc.pojo;

/**
 * @description:
 * @author: cong
 * @create: 2025/2/22
 */
public class Card implements Cloneable{
    String bankName;
    Integer money;

    public Card() {
    }

    public Card(String bankName, Integer money) {
        this.bankName = bankName;
        this.money = money;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public Integer getMoney() {
        return money;
    }

    public void setMoney(Integer money) {
        this.money = money;
    }

    @Override
    public Card clone() {
        try {
            // TODO: copy mutable state here, so the clone can't change the internals of the original
            return (Card) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new AssertionError();
        }
    }

    @Override
    public String toString() {
        return bankName + ":" + money;
    }
}
